home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / musica / ampskins / angedelo / region.txt < prev    next >
Text File  |  1999-01-01  |  6KB  |  106 lines

  1. ; I stole this from the Complex skin, cause hey I thought it was cool :)
  2. ; (and cause I'm too lazy to document it myself. :)
  3. ; The original author is Adam Kennedy <adamk@iname.com>
  4. ;
  5. ; Hope you don't mind Adam :)
  6. ;
  7. ;
  8. ; -Justin
  9. ;
  10. ;
  11. ; P.S. you can use the section names [WindowShade] and [Equalizer]
  12. ; for obvious purposes =)
  13. ;
  14. ;
  15. ;                    REGION.TXT STRUCTURE FOR DEFINING SKIN MASKS
  16. ;
  17. ;The region information comes without any supporting documentation
  18. ;so I thought I might as well make some.
  19. ;
  20. ;The region.txt in WinAmp 1.92 allows us to some interesting things with transparencies
  21. ;But how does it work?
  22. ;
  23. ;Well, basically, it lets you define a set of polygons. Anything inside a polygon is drawn. Anything not in a polygon is not drawn. Simple heh?
  24. ;For how to define it have a look below at the first block. Un-comment it now. Don't worry about commenting the actual one lower down, if WinAmp finds multiple definitions, it only does the first and ignores the rest
  25. ;
  26. ;How to make a mask
  27. ;1. Type [Normal]. Real simple that one. (My guess is it is just for forward compatibility)
  28. ;2. Just type the NumPoints= and leave the number blank, we'll fill it in later
  29. ;3. OK, now for the fun part.
  30. ;   The co-ordinates you should type in are the OUTSIDE pixel co-ordinates in x,y format.
  31. ;   Start at the top lefthand corner and work your way CLOCKWISE around you polygon.
  32. ;   Now WinAmp ONLY accepts the PointList as one line of comma seperated variables.
  33. ;   You can use spaces, but DONT GO ONTO A NEW LINE. Clear? Good. :)
  34. ;   One last thing, don't type the first position again at the end, WinAmp joins them.
  35. ;   Putting a space between each pair is simply common sense, right?
  36. ;4. Once your done, count the number of co-ords, and fill in that number for NumPoints.
  37. ;
  38. ;Oh, as a side note, the x variables go from 0 to 275, and the y from 0 to 116.
  39. ;So if you look at the first example you can see I've gone across the second top line, gone down a bit, ducked in one pixel, gone down to the bottom, and across and back up the other side, putting another ledge on the other side.
  40.  
  41. ;This does the outside border, and chops some bits out on the top and edges
  42. [Normal]
  43. NumPoints=8    ;Do this LAST!
  44. PointList=1,0,  274,0,  275,1,  275,114,  273,116,  1,116,  0,114,  0,1  
  45.  
  46. ;Cool heh? Very subtle effect. Now lets try a more complex one, with multiple polygons
  47. ;For your first hard(ish) mask, I suggest defining each element as a seperate mask.
  48. ;It makes them a bit easier to think about.
  49.  
  50. ;First, lets define an area that JUST does the titlebar.
  51. ;[Normal]
  52. ;NumPoints=4
  53. ;PointList=0,1,  275,1,  275,14,  0,14
  54.  
  55. ;Simple as can be :)
  56. ;Go ahead, uncomment it and have a look. Just remember to recomment everything above it
  57. ;Doing your areas one at a time does speed the process up a bit
  58.  
  59. ;Now lets define JUST the area sort of inside the outer ring
  60. ;[Normal]
  61. ;NumPoints = 4
  62. ;PointList = 3,15,  272,15,  272,113,  3,113
  63.  
  64. ;Right, so say we want a mask that has, the titlebar AND the main area.
  65. ;We just add them together
  66. ; [Normal] 
  67. ; NumPoints = 4, 4  ;Make sure to get the order right(although it doesnt matter here =P )
  68. ; PointList = 0,1, 275,1, 275,14, 0,14,     3,15, 272,15, 272,113, 3,113
  69.  
  70. ;Dont forget to add that extra comma after the first set.
  71. ; Having that bigger gap that lets you "keep it in your head" easier, it's a good idea
  72.  
  73. ;OK, now lets try something tricky. We are going to make a mask for just one green line around the outside of the skin
  74. ;This introduces the other "big thing" with masks. Have a look at the first three co-ordinates below. You can see the first two moves we make are to go one to the side and then go down to the bottom. Looking at the last co-ordinate you can see we will come back up at the end, making a line two wide, right? 
  75. ;WRONG!! Here comes the big important phrase.
  76. ;IF YOU ARNT FOLLOWING THE OUTSIDE EDGE, YOUR CO-ORDINATES MARK TRANSPARENT SPACE LIMITS
  77. ;That's right. Because I don't make a square, because I have to turn "inside" the box, I am only marking space, and what I end up with is a mask with one green line.
  78. ;WARNING: Leave your skins dialog open when you do this one. :)
  79. ;[Normal]
  80. ;NumPoints = 8
  81. ;PointList = 1,14,  2,14,  2,114,  273,114,  273,14,  274,14,  274,115,  1,115
  82.  
  83. ;OK, as the final touch lets add lets the border we just made to the other two.
  84. ;You should be able to work this out on your own
  85. ;[Normal]
  86. ;NumPoints = 4, 4, 8
  87. ;PointList = 0,1, 275,1, 275,14, 0,14,     3,15, 272,15, 272,113, 3,113,     1,14, 2,14, 2,114, 273,114, 273,14, 274,14, 274,115, 1,115
  88.  
  89. ;hmm... that still looks a bit tacky down the bottom right
  90. ;So I'm going to modify it a bit
  91. ;See if you can work out what I've had to alter just by looking at the display of it
  92. ;[Normal]
  93. ;NumPoints = 4, 4, 8
  94. ;PointList = 0,1, 275,1, 275,14, 0,14,     3,15, 272,15, 272,80, 3,80,     1,14, 2,14, 2,81, 273,81, 273,14, 274,14, 274,115, 1,115
  95.  
  96.  
  97. ; Justin's whacked trans skin :) in one, big lame messy line
  98. ; [Normal]
  99. ; NumPoints=20,4,4,4,8,4,4,6,6,4,4,4,4
  100. ; PointList=0,0,19,0,19,11,114,11,114,0,156,0,156,11,243,11,243,0,275,0,275,13,266,13,266,22,264,22,264,13,111,13,111,22,109,22,109,13,0,13,     109,22,266,22,266,36,109,36, 16,88,130,88,130,105,16,105,    136,89,157,89,157,104,136,104,    22,13,22,62,102,62,102,13,100,13,100,24,24,24,24,13,    0,0,275,0,275,3,0,3,   16,72,264,72,264,81,16,81,  0,13,0,78,16,78,16,75,4,75,4,13,   275,13,275,78,264,78,264,75,272,75,272,13,     14,78,16,78,16,105,14,105,     130,81,132,81,132,105,130,105,     146,81,146,89,148,89,148,81,     130,96,136,96,136,98,130,98
  101.  
  102. ;THE END
  103. ;
  104. ;Post-Script
  105. ;The other good thing about doing your mask in bits and pieces like this is that can make multiple versions so you can change as your whims change
  106.